// 公司详细页的头部信息 me
import { NavLink } from "react-router-dom";
import { ICompany } from "../../types";
import style from "./style.module.css";

import * as Enum from "../../assets/enum";

interface Props {
  company: ICompany | undefined;
  number: number;
}

export default function CompanyNav(props: Props) {
  return (
    <header>
      <div className={style.introBasis}>
        <img src={props.company?.logo} alt="" className={style.basisImg} />
        <div className={style.basisBody}>
          <h1 className={style.title}>{props.company?.companyShortName}</h1>
          <div className={style.bodyCon}>
            {Enum.toSize(props.company?.companySize)} ·{" "}
            {Enum.toFinance(props.company?.financeStage)} ·{" "}
            {props.company?.industryField}
          </div>
          <div className={style.updateTime}>
            {props.company?.updateAt} 更新公司信息
          </div>
        </div>
      </div>
      <div className={style.tabs}>
        <NavLink
          to={"/company/detaile/" + props.company?._id}
          className={style.tabItem}
          exact
          activeClassName={style.active}
        >
          <span>公司信息</span>
        </NavLink>
        <NavLink
          to={"/company/hotRecruit/" + props.company?._id}
          className={style.tabItem}
          activeClassName={style.active}
        >
          <span>热招职位({props.number})</span>
        </NavLink>
      </div>
    </header>
  );
}
